/**
 * There are <a href="https://github.com/ketayao/keta-custom">keta-custom</a> code generation
 */
package fms.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import fms.entity.CptSend;

public interface CptSendDAO extends JpaRepository<CptSend, Long>, JpaSpecificationExecutor<CptSend> {
	
	
	@Query("select  count(*)    FROM CptSend d  where planDate>=to_date(?1,'yyyy-mm-dd')  and planDate<=to_date(?2,'yyyy-mm-dd') and  sendType=2  ")
	public List findFlpChartTotalCount(String startDate, String endDate);

    @Query("FROM CptSend d  where  flightId=?1 and  aircraftId=?2    and sendType=1 ORDER BY  planDate  DESC ")
    public List<CptSend> findCptSendwid(String flightId, String aircraftId);

 

}